package com.rankeiot.platform.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.sagacity.sqltoy.config.annotation.Column;
import org.sagacity.sqltoy.config.annotation.Entity;
import org.sagacity.sqltoy.config.annotation.Id;

import java.io.Serializable;
import java.sql.Types;
import java.util.Date;

@Schema(description = "编码规则")
@Data
@Entity(tableName = "t_codes",comment = "编码规则")
public class Codes  implements Serializable {
    @Schema(description="ID")
    @Id
    @Length(max=20)
    @Column(name="id",length=20L,type= Types.VARCHAR)
    String id;

    @Schema(description="名称")
    @Length(max=100)
    @Column(name="name",length=100L,type= Types.VARCHAR)
    String name;
    @Schema(description="备注")
    @Length(max=255)
    @Column(name="memo",length=255L,type= Types.VARCHAR)
    String memo;

    @Schema(description="规则")
    @Column(name="rules",type= Types.CLOB)
    String rules;

    @Schema(description="添加时间")
    @Column(name="add_time",type= Types.TIMESTAMP)
    Date addTime;

    @Schema(description="添加人")
    @Length(max=50)
    @Column(name="add_user",length=50L,type= Types.VARCHAR)
    String addUser;

    @Schema(description="修改时间")
    @Column(name="modify_time",type= Types.TIMESTAMP)
    Date modifyTime;

    @Schema(description="修改人")
    @Length(max=50)
    @Column(name="modify_user",length=50L,type= Types.VARCHAR)
    String modifyUser;
}
